<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="validausuario.jsp"%>
<%@ page import="mobility.*" %>
<%@ page import="java.sql.*" %>
<%
	String perfil = (String)session.getAttribute("perfil");
	if (!perfil.equals("Admin")) {
		response.sendRedirect("accesodenegado.jsp");
		return;
	}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Estado Asignaciones Ordenes</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="main.css">
<script src="js/jquery-1.3.2.js" language="JavaScript"></script>
<link rel="Shortcut Icon" href="icono_tm.ico" type="image/x-icon" />
<script type="text/javascript" src="js/epoch_classes.js"></script>
<link rel="stylesheet" type="text/css" href="js/epoch_styles.css" />
<script type="text/javascript" language="javascript">
var calendario; // declare the calendars as global variables
window.onload = function () {
  /*initialize any calendars on the page - in this case 3.*/
  calendario  = new Epoch('calendario','popup',document.getElementById('fecha'));
  initialize();
}; 
	
	function buscar() {
		url = "BuscarRecurso.jsp";
		window.open(url , "BuscarRecurso" , "width=600,height=500,scrollbars=YES,menubar=No,toolbar=NO,status=YES"); 
	}
	
	function consultar() {
		var recurso = $("#cedula").val();
		var fecha = $("#fecha").val();
		var url = "SrvOrders?operacion=lista_ejecucion&recurso=" + recurso + "&fecha=" + fecha;
		$("#list").load(url);
	}
	

</script>
</head>
<body>
<%@ include file="header.jsp" %>
<h2>Estado asignaciones</h2>
<div id="info"></div>
<form action="SrvDownloadOrders" name="form1">
	<table>
		<tr>
			<th colspan="4">Seleccion Recurso</th>
		</tr>
		<tr>
			<td>Recurso</td>
			<td colspan="3"><input type="text" name="cedula" id="cedula" readonly><input type="text" name="nombre" id="nombre" size=40 readonly> <input type="button" name="cmd_buscar" id="cmd_buscar" value="Buscar" onclick="javascript:buscar()" ></td>
		</tr>
		<tr>
			<td>Fecha</td>
			<td><input type="text" name="fecha" id="fecha" readonly value="<%= Utilidades.strDateServer()  %>"> <input type="button" value="..." onclick="calendario.toggle();" /></td>
		</tr>
		<tr>
			<td colspan="4"><input type="button" name="cmd_buscar" value="Consultar" onclick="javascript:consultar()" > <input type="submit" name="cmd_download" value="Descargar" > <input type="hidden" name="operacion" value="download_resource" > </td>
		</tr>
	</table>

</form>
<div id="list"></div>
<%@ include file="foot.jsp" %>
</body>
</html>
